@echo off
set short=%~dp0deemixguifiles\guifiles\short.exe
if not exist deemixfiles\deemix\server.py goto No
if exist "%userprofile%\Desktop\Deemix GUI.lnk" set Auto_mode=Auto_yes
if not exist "%userprofile%\Desktop\Deemix GUI.lnk" set Auto_mode=Auto_no
if %Auto_mode%==Auto_yes set noice=[41mWill override/fix both Desktop and Main Directory Shortcuts[0m
if %Auto_mode%==Auto_no set noice=[44mWill override/fix only Main Directory Shortcuts[0m
goto first

:first
cls
echo.
echo [42mDeemix GUI Shortcut Manager[0m
echo [42mWelcome! This Will Fix your Shortcut Problems[0m
echo ==============================================
echo (1) : Create/Fix Shortcut on Main Directory
echo (2) : Create/fix Shortcut at Desktop
echo (3) : Create/fix Shortcut Both Desktop and Main Directory
echo (4) : Auto Mode(Note: %noice%)
echo ==============================================
echo Type E to exit
echo.
set /p menu="Select a Number:"
if %menu%==1 goto fix
if %menu%==2 goto desktop
if %menu%==3 goto fix_w_desktop
if %menu%==4 goto %Auto_mode%
if %menu%==e exit
if %menu%==E exit
cls
echo Invalid Entry, Try Again.
pause
goto first
exit


:fix
cls
%short% /f:"Deemix GUI.lnk" /a:c /t:"%~dp0deemixguifiles\guifiles\MainData\start_gui.vbs" /w:"%~dp0deemixguifiles\guifiles\MainData" /i:"%~dp0icon.ico"
cls
echo  Shortcut Fixed!!!
pause
exit

:fix_w_desktop
cls
%short% /f:"Deemix GUI.lnk" /a:c /t:"%~dp0deemixguifiles\guifiles\MainData\start_gui.vbs" /w:"%~dp0deemixguifiles\guifiles\MainData" /i:"%~dp0icon.ico"
%short% /f:"%userprofile%\Desktop\Deemix GUI.lnk" /a:c /t:"%~dp0deemixguifiles\guifiles\MainData\start_gui.vbs" /w:"%~dp0deemixguifiles\guifiles\MainData" /i:"%~dp0icon.ico"
cls
echo  Shortcuts Fixed!!!
pause
exit


:desktop
cls
%short% /f:"%userprofile%\Desktop\Deemix GUI.lnk" /a:c /t:"%~dp0deemixguifiles\guifiles\MainData\start_gui.vbs" /w:"%~dp0deemixguifiles\guifiles\MainData" /i:"%~dp0icon.ico"
cls
echo Shortcut Has Been Created to Desktop!:D
pause
exit

:Auto_yes
cls
%short% /f:"Deemix GUI.lnk" /a:c /t:"%~dp0%~dp0deemixguifiles\guifiles\MainData\start_gui.vbs" /i:"%~dp0icon.ico"
%short% /f:"%userprofile%\Desktop\Deemix GUI.lnk" /a:c /t:"%~dp0deemixguifiles\guifiles\MainData\start_gui.vbs" /w:"%~dp0deemixguifiles\guifiles\MainData" /i:"%~dp0icon.ico"
cls
echo  Shortcuts Fixed!!!
pause
exit


:Auto_no
cls
%short% /f:"Deemix GUI.lnk" /a:c /t:"%~dp0deemixguifiles\guifiles\MainData\start_gui.vbs" /w:"%~dp0deemixguifiles\guifiles\MainData" /i:"%~dp0icon.ico"
cls
echo  Shortcut Fixed!!!
pause
exit


:No
echo The Program Is either Not Installed Or not Properly Installed. Pls Run Install.bat before Continuing
pause
exit
